<template>
    <van-search
      background="#0075ea"
      v-model="value"
      placeholder="请输入搜索关键词"
      @search="onSearch"
      @cancel="onCancel"
    />
</template>

<script>
import { Search } from 'vant';
export default {
  name: "search",
  components: {
    [Search.name]: Search
  },
  data() {
    return {
      value: ''
    };
  },
  methods: {
    onSearch() {
      console.log(111)
    },
    onCancel() {
      console.log(222)
    }
  }
};
</script>

<style scoped lang="less">
  
</style>
